use std::fmt::Display;

fn bubble_sort<'a,T:PartialOrd+Display>(t:&'a mut Vec<T>,len:&'a usize)->&'a Vec<T>{
	for i in 0..len-1{
		for j in 0..len-1-i{
			if t[j]>t[j+1]{
				t.swap(j,j+1);
			}
		}
	}
	return t;
}

fn main() {
    let mut s=vec![1,4,5,3,6,2] ;
	let l:usize=6;
	println!("{:?}  ", bubble_sort(&mut s,&l));	
}